package eu.dominicum.ft.pd.mao;

import javax.annotation.PostConstruct;
import javax.inject.Named;
import javax.validation.constraints.NotNull;

/**
 * Method Arguments Object for {@link eu.dominicum.ft.pd.Tour#make(MakeTourMAO)}.
 *
 * @author Harry Klerks
 * @since 2013M1
 */
@Named
public final class MakeTourMAO {

    /**
     * Default number of stages.
     */
    private static final int DEFAULT_NUMBER_OF_STAGES = 20;
    /**
     * Default number of teams.
     */
    private static final int DEFAULT_NUMBER_OF_TEAMS = 22;
    /**
     * Default lowest yersey number.
     */
    private static final int DEFAULT_YERSEY_NUMBER_LOW = 1;
    /**
     * Default highest yersey number.
     */
    private static final int DEFAULT_YERSEY_NUMBER_HIGH = 9;

    /**
     * Name.
     */
    @NotNull(message = "Tour moet een naam hebben")
    private String name;

    /**
     * Number of stages in the tour.
     */
    @NotNull(message = "Aantal etappes is een verplicht veld")
    private Integer numberOfStages;

    /**
     * Is there a prologue in the tour?
     */
    @NotNull(message = "Proloog indicatie is een verplicht veld")
    private Boolean prologue;

    /**
     * The number of teams to generate in the Tour. Default is 22.
     */
    @NotNull(message = "Aantal teams is een verplicht veld")
    private Integer numberOfTeams;

    /**
     * The lowest yersey number in a Team. Default is 1.
     */
    @NotNull(message = "Rugnummer laag is een verplicht veld")
    private Integer yerseyNumberLow;

    /**
     * The highest yersey number in a Team. Default is 9.
     */
    @NotNull(message = "Rugnummer hoog is een verplicht veld")
    private Integer yerseyNumberHigh;

    /**
     * Initializes this bean.
     */
    @PostConstruct
    public void init() {

        this.numberOfStages = DEFAULT_NUMBER_OF_STAGES;
        this.numberOfTeams = DEFAULT_NUMBER_OF_TEAMS;
        this.yerseyNumberLow = DEFAULT_YERSEY_NUMBER_LOW;
        this.yerseyNumberHigh = DEFAULT_YERSEY_NUMBER_HIGH;
    }

    /**
     * .
     *
     * @return String
     */
    public String getName() {
        return name;
    }

    /**
     * .
     *
     * @param newName -
     */
    public void setName(final String newName) {
        this.name = newName;
    }

    /**
     * .
     *
     * @return Integer
     */
    public Integer getNumberOfStages() {
        return numberOfStages;
    }

    /**
     * .
     *
     * @param newNumberOfStages -
     */
    public void setNumberOfStages(final Integer newNumberOfStages) {
        this.numberOfStages = newNumberOfStages;
    }

    /**
     * .
     *
     * @return Boolean
     */
    public Boolean getPrologue() {
        return prologue;
    }

    /**
     * .
     *
     * @param newPrologue -
     */
    public void setPrologue(final Boolean newPrologue) {
        this.prologue = newPrologue;
    }

    /**
     * .
     *
     * @param newNumberOfTeams -
     */
    public void setNumberOfTeams(final Integer newNumberOfTeams) {
        this.numberOfTeams = newNumberOfTeams;
    }

    /**
     * .
     *
     * @return Integer
     */
    public Integer getNumberOfTeams() {
        return numberOfTeams;
    }

    /**
     * @param newYerseyNumberLow -
     */
    public void setYerseyNumberLow(final Integer newYerseyNumberLow) {
        this.yerseyNumberLow = newYerseyNumberLow;
    }

    /**
     * .
     *
     * @return Integer
     */
    public Integer getYerseyNumberLow() {
        return yerseyNumberLow;
    }

    /**
     * .
     *
     * @param newYerseyNumberHigh -
     */
    public void setYerseyNumberHigh(final Integer newYerseyNumberHigh) {
        this.yerseyNumberHigh = newYerseyNumberHigh;
    }

    /**
     * .
     *
     * @return Integer
     */
    public Integer getYerseyNumberHigh() {
        return yerseyNumberHigh;
    }
}
